Predicate Dispatching: A Unified Theory of Dispatch

نویسندگان

  • Michael D. Ernst
  • Craig S. Kaplan
  • Craig Chambers
چکیده

Predicate dispatching generalizes previous method dispatch mechanisms by permitting arbitrary predicates to control method applicability and by using logical implication between predicates as the overriding relationship. The method selected to handle a message send can depend not just on the classes of the arguments, as in ordinary object-oriented dispatch, but also on the classes of subcomponents, on an argument’s state, and on relationships between objects. This simple mechanism subsumes and extends object-oriented single and multiple dispatch, ML-style pattern matching, predicate classes, and classifiers, which can all be regarded as syntactic sugar for predicate dispatching. This paper introduces predicate dispatching, gives motivating examples, and presents its static and dynamic semantics. An implementation of predicate dispatching is available.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Predicate Dispatching: a Uniied Theory of Dispatch

Predicate dispatching generalizes previous method dispatch mechanisms by permitting arbitrary predicates to control method applicability and by using logical implication between predicates as the overriding relationship. The method selected to handle a message send can depend not just on the classes of the arguments, as in ordinary object-oriented dispatch, but also on the classes of subcompone...

متن کامل

Efficient Multiple and Predicate Dispatching

The speed of message dispatching is an important issue in the overall performance of object-oriented programs. We have developed an algorithm for constructing efficient dispatch functions that combines novel algorithms for efficient single dispatching, multiple dispatching, and predicate dispatching. Our algorithm first reduces methods written in the general predicate dispatching model (which g...

متن کامل

Efficient Predicate Dispatching

The speed of method dispatching is an important issue in the overall performance of object-oriented programs. We have developed an algorithm for constructing efficient dispatch functions for the general predicate dispatching model, which generalizes single dispatching, multiple dispatching, predicate classes and classifiers, and patternmatching. Our algorithm generates a lookup DAG each of whos...

متن کامل

Exploring Erlang Style Concurrency in Ruby

This paper introduces Stage, a Ruby implementation of Actors inspired by the concurrency support in the Erlang programming language. This implementation demonstrates how dynamic language features can be used to implement convenient and expressive concurrency support. Stage has several interesting features that contribute to this expressiveness, including: (1) pattern based support for receiving...

متن کامل

A Mathematical Model to Optimize Allocation Sequence in Dispatching Problem

Truck-Shovel fleet, as the most common transportation system in open-pit mines, has a significant part of mining costs, for which optimal management can lead to substantial cost reductions. Among the available dispatch mathematical models, the multi-stage approach is well suited for allocating trucks to respected shovels in a dynamic dispatching program. However, with this kind of modeling sequ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1998